#pragma once
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <assert.h>

typedef int HPDataType;

typedef struct HeapNode
{
	HPDataType* a;
	int size;
	int capacity;
}HeapNode;

void AdjustUp(HPDataType* a, int child);

void AdjustDown(HPDataType* a, int n, int parent);

void HeapInit(HeapNode* php);

void HeapDestroy(HeapNode* php);

void HeapPush(HeapNode* php, int x);

void HeapPop(HeapNode* php);

void PrintfHeap(HeapNode* php);

void Swap(HPDataType* x, HPDataType* y);

bool HeapIsEmpyt(HeapNode* php);

bool HeapIsFull(HeapNode* php);

